<p:dialog xmlns="http://www.w3.org/1999/xhtml"
      	  xmlns:h="http://java.sun.com/jsf/html"
      	  xmlns:f="http://java.sun.com/jsf/core"
      	  xmlns:ui="http://java.sun.com/jsf/facelets"
      	  xmlns:p="http://primefaces.org/ui"
      	  modal="true"  resizable="true" width="30%"
		  widgetVar="dialogManterModalidade" id="idDialogManterModalidade" closable="true"
		  appendTo="@(body)" header="Cadastrar Nova Modalidade"> 	
  	
	 <link rel="stylesheet" type="text/css" href="./estilos.css"/>  
<h:form id="formDialogManterModalidade" prependId="false">
<h:panelGroup id="pgDialogManterModalidade">
 	<p:messages id="messagesPlanoManterModalidade" autoUpdate="true" closable="true" />  
    	<h:panelGrid id="pgPlanoManterModalidade" columns="3" style="margin-top:20px; margin-right:10%;">  
            <h:outputLabel value="Código" styleClass="outputLabel"/>  
            <h:outputLabel value="Modalidade*" styleClass="outputLabel"/>    
            <h:outputLabel value="Preço" styleClass="outputLabel"/>         
            <p:inputText value="#{planoBean.modalidade.idModalidade}" styleClass="inputId" disabled="true"/>  
  			<p:inputText value="#{planoBean.modalidade.descricao}"  styleClass="inputDescricao" maxlength="40"
  							required="true" requiredMessage="Preencher o nome da Modalidade!">
  				<f:ajax listener="#{planoBean.ajaxGet}"/>
  			</p:inputText>  
  			<p:inputText value="#{planoBean.modalidade.valor}" styleClass="inputData" maxlength="6">
  				<f:convertNumber type="number"/>
  				<f:ajax listener="#{planoBean.ajaxGet}"/>
  			</p:inputText>
        </h:panelGrid> 
    <p:commandButton value="Salvar" actionListener="#{planoBean.saveModalidade}" process="@this" update="pgDialogManterModalidade"  /> 
	<p:commandButton value="Sair" actionListener="#{planoBean.closeManterModalidade}" process="@this" immediate="true" style="margin-right:20px;" /> 
</h:panelGroup>
</h:form>  	
</p:dialog>
